ServerEvents.recipes((event) => {
    //待机配方
    event.recipes.custommachinery.custom_machine("eou:laser_carver/stress_port", 20)
        .requireSU(1, 4)
        .requireFunctionOnEnd((ctx) => {
            ctx.machine.data.supply = 0;
            ctx.machine.data.work = 0;
            return Result.success()
        })
        .resetOnError()
    event.recipes.custommachinery.custom_machine("eou:laser_carver/stress_port", 20)
        .priority(1)
        .requireStructure([[
            "ACA",
            "DAB",
            "AmA",
        ], [
            "AAA",
            "A A",
            "AAA",
        ], [
            "AAA",
            "AEA",
            "AAA",
        ]], {
            "A": "eou:laser_carver_shell",
            "B": "eou:laser_carver/exportation_port",
            "C": "eou:laser_carver/power_port",
            "D": "eou:laser_carver/controller",
            "E": "eou:laser_carver/feed_port"
        })
        .requireSU(256, 1024)
        .requireFunctionToStart((ctx) => {
            if (ctx.machine.data.work == 0) {
                return Result.success()
            } else {
                return Result.error('Working')
            }
        })
        .requireFunctionOnEnd((ctx) => {
            ctx.machine.data.supply = 1;
            return Result.success()
        })
        .resetOnError()
    event.recipes.custommachinery.custom_machine("eou:laser_carver/stress_port", 20)
        .priority(1)
        .requireStructure([[
            "ACA",
            "DAB",
            "AmA",
        ], [
            "AAA",
            "A A",
            "AAA",
        ], [
            "AAA",
            "AEA",
            "AAA",
        ]], {
            "A": "eou:laser_carver_shell",
            "B": "eou:laser_carver/exportation_port",
            "C": "eou:laser_carver/power_port",
            "D": "eou:laser_carver/controller",
            "E": "eou:laser_carver/feed_port"
        })
        .requireSU(256, 16384)
        .requireFunctionToStart((ctx) => {
            if (ctx.machine.data.work == 1) {
                return Result.success()
            } else {
                return Result.error('Not Working')
            }
        })
        .requireFunctionOnEnd((ctx) => {
            ctx.machine.data.supply = 1;
            return Result.success()
        })
        .resetOnError()

})